<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head> 
    <meta charset="UTF-8">
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
    <c:set value="<%=ResourcesUtil.getConfig(\"reserver_meterial_wait_accept\")%>" var="statusWaitAccept" />
    <c:set value="<%=ResourcesUtil.getConfig(\"handbook_status_done\")%>" var="handbookStatusDone" />
    <script>
    var statusWaitAccept = "${statusWaitAccept}";
    var handbookStatusDone = "${handbookStatusDone}";
    
    
    $(function(){
        $(".tabBox ul li").each(function(){
            var index=$(this).index();

            $(".tabBox ul li").eq(0).addClass("active");

            $(this).click(function(){

                $(this).addClass("active").siblings().removeClass("active");

                $(".tabBoxSm > .tabSm").eq(index).stop(true).show().siblings().stop(true).hide();
				
				var tableW = $(".tabBoxSm > .tabSm").eq(index).find('.tableHead').width();
				var tabodyH = $(".tabBoxSm > .tabSm").eq(index).find('.tableBody').height();
				var tableScrollH = $(".tabBoxSm > .tabSm").eq(index).find('.tableScroll').height();
				if(tabodyH>tableScrollH){
					$(".tabBoxSm > .tabSm").eq(index).find('.tableScroll').css('width',tableW + 18 + 'px');
				}else{
					$(".tabBoxSm > .tabSm").eq(index).find('.tableScroll').css('width','inherit');
				}
            });
        });
        $("select").select2();

    });
    
    // 出口明细追加
    function selectIndentCallBack(indentId){
		if(indentId!=null && indentId!='' && indentId!="undefined"){
				$("#indentId").val(indentId);
		    	// 格式化，去除逗号
		        formUnFormat($("#inputForm"));
		 	    var params = $("#inputForm").serialize();
		        // 调用后台更新数据
		        $.post("${ctx}/purchase/handbook/addExportDetail",params,function(result) {
		            // 回调函数赋值
		            var h = $(callBackHtml(result)).find("#handbookinfo").html();
		            $('#handbookinfo').html(h);
		            $("select").select2();
		            
		            var hNum = $(callBackHtml(result)).find("#handbookExportNumber").html();
		            $('#handbookExportNumber').html(hNum);
		            
		            var hSum = $(callBackHtml(result)).find("#handbookExportSum").html();
		            $('#handbookExportSum').html(hSum);
		        }, 'html');
			}
    }
	
    // 出口明细删除
    function deleteIndent(trIndex){
    	$("#trIndex").val(trIndex);
    	// 格式化，去除逗号
        formUnFormat($("#inputForm"));
 	    var params = $("#inputForm").serialize();
        // 调用后台更新数据
        $.post("${ctx}/purchase/handbook/delExportDetail",params,function(result) {
            // 回调函数赋值
            var h = $(callBackHtml(result)).find("#handbookinfo").html();
            $('#handbookinfo').html(h);
            $("select").select2();
            
            var hExNum = $(callBackHtml(result)).find("#handbookExportNumber").html();
            $('#handbookExportNumber').html(hExNum);
            
            var hExSum = $(callBackHtml(result)).find("#handbookExportSum").html();
            $('#handbookExportSum').html(hExSum);
            
            var hImNum = $(callBackHtml(result)).find("#handbookImportNumber").html();
            $('#handbookImportNumber').html(hImNum);
            
            var hImSum = $(callBackHtml(result)).find("#handbookImportSum").html();
            $('#handbookImportSum').html(hImSum);
        }, 'html');
    }
    
    // 选择物料页面
    function proMaterialSelect(){
    	popup('800px','519px','${ctx}/purchase/handbook/proMaterialSelect?commaIndentId=' + $('#commaIndentId').val());
    }
    
    // 出口料件明细追加
    function selectMaterialCallBack(commaMaterialReservePurchaseId){
		if(commaMaterialReservePurchaseId!=null && commaMaterialReservePurchaseId!=''){
			$("#commaMaterialReservePurchaseId").val(commaMaterialReservePurchaseId);
	    	// 格式化，去除逗号
	        formUnFormat($("#inputForm"));
	 	    var params = $("#inputForm").serialize();
	        // 调用后台更新数据
	        $.post("${ctx}/purchase/handbook/addImportDetail",params,function(result) {
	            // 回调函数赋值
	            var h = $(callBackHtml(result)).find("#handbookinfo").html();
	            $('#handbookinfo').html(h);
	            
	            var hImNum = $(callBackHtml(result)).find("#handbookImportNumber").html();
	            $('#handbookImportNumber').html(hImNum);
	            
	            var hImSum = $(callBackHtml(result)).find("#handbookImportSum").html();
	            $('#handbookImportSum').html(hImSum);
	            
	            $("select").select2();
				$(".tabBox ul li").eq(0).removeClass("active");
				$(".tabBox ul li").eq(1).addClass("active");
				$(".tabBoxSm > .tabSm").eq(1).stop(true).show().siblings().stop(true).hide();
	        }, 'html');
		}
    }
    
    // 进口料件删除
    function deleteMaterial(trIndex){
    	$("#trIndex").val(trIndex);
    	// 格式化，去除逗号
        formUnFormat($("#inputForm"));
 	    var params = $("#inputForm").serialize();
        // 调用后台更新数据
        $.post("${ctx}/purchase/handbook/delImportDetail",params,function(result) {
            // 回调函数赋值
            var h = $(callBackHtml(result)).find("#handbookinfo").html();
            $('#handbookinfo').html(h);
            $("select").select2();
            
            var hImNum = $(callBackHtml(result)).find("#handbookImportNumber").html();
            $('#handbookImportNumber').html(hImNum);
            
            var hImSum = $(callBackHtml(result)).find("#handbookImportSum").html();
            $('#handbookImportSum').html(hImSum);
            
			$(".tabBox ul li").eq(0).removeClass("active");
			$(".tabBox ul li").eq(1).addClass("active");
			$(".tabBoxSm > .tabSm").eq(1).stop(true).show().siblings().stop(true).hide();
        }, 'html');
    }
    
    //保存方法
    var saveForm={
         s:null,
         t:null,
         save:function(s,t){
        	 if (!confirm('<spring:message code="common_save"/>')) {
        		 return;
        	 }
        	 
             $(t).attr("disabled",true);
             this.s=s;
             this.t=t;
             
             if(saveForm.s==0){
            	 $("#handbookStatus").val(handbookStatusDone);
            	 $("#handbookAuditStatus").val(statusWaitAccept);
             }

	       	 // 格式化，去除逗号
	         formUnFormat($("#inputForm"));
	         // 从表单获取数据信息
	         var params = $("#inputForm").serialize();
	         // 调用后台保存方法
	         $.post("${ctx}/purchase/handbook/save",params,function(result){
	             // 提示信息
	             tipParent(result.message);
	             // 返回状态
	             if(result.statusCode==STATUSCODEOK){
	                  window.parent.frames[0].searchListForm();
	                  closeWin(); 
	             }else{
	                  $(saveForm.t).attr("disabled",false);
	             }
	         },'json'); 
         } 
    }
    
    // 重新设置出口成品总值，总量
    function resetExportTotalValue(trIndex,qObj){
    	    $("#trIndex").val(trIndex);
	    	// 格式化，去除逗号
	        formUnFormat($("#inputForm"));
	    	
	    	if($(qObj).val()==null || $(qObj).val()==''){
	    		$(qObj).val(0);
	    	}
	    	
	 	    var params = $("#inputForm").serialize();
	        // 调用后台更新数据
	        $.post("${ctx}/purchase/handbook/resetExport",params,function(result) {
	            // 回调函数赋值
	            var h = $(callBackHtml(result)).find("#handbookinfo").html();
	            $('#handbookinfo').html(h);
	            $("select").select2();
	            
	            var hNum = $(callBackHtml(result)).find("#handbookExportNumber").html();
	            $('#handbookExportNumber').html(hNum);
	            
	            var hSum = $(callBackHtml(result)).find("#handbookExportSum").html();
	            $('#handbookExportSum').html(hSum);
	        }, 'html');
    }
    
    // 重新设置进口成品总值，总量
    function resetImportTotalValue(trIndex,qObj){
    	    $("#trIndex").val(trIndex);
	    	// 格式化，去除逗号
	        formUnFormat($("#inputForm"));
	    	
	    	if($(qObj).val()==null || $(qObj).val()==''){
	    		$(qObj).val(0);
	    	}
	    	
	 	    var params = $("#inputForm").serialize();
	        // 调用后台更新数据
	        $.post("${ctx}/purchase/handbook/resetImport",params,function(result) {
	            // 回调函数赋值
	            var h = $(callBackHtml(result)).find("#handbookinfo").html();
	            $('#handbookinfo').html(h);
	            $("select").select2();
	            
	            var hImNum = $(callBackHtml(result)).find("#handbookImportNumber").html();
	            $('#handbookImportNumber').html(hImNum);
	            
	            var hImSum = $(callBackHtml(result)).find("#handbookImportSum").html();
	            $('#handbookImportSum').html(hImSum);
	            
				$(".tabBox ul li").eq(0).removeClass("active");
				$(".tabBox ul li").eq(1).addClass("active");
				$(".tabBoxSm > .tabSm").eq(1).stop(true).show().siblings().stop(true).hide();
	        }, 'html');
    }
    </script> 
</head>
<body>
<div class="layerHeader clearfix">
	<p class="headerTitle"><spring:message code="handBook_create_title"/></p>
    <div class="headerButton clearfix">
        <button type="button" onclick="saveForm.save(0,this)"><spring:message code="pecimenProduct_btn_submit"/></button>
        <button type="button" onclick="popup('800px','519px','${ctx}/purchase/handbook/indentSelect')"><spring:message code="handBook_create_button_indent"/></button>
        <button type="button" onclick="proMaterialSelect();"><spring:message code="handBook_create_button_material"/></button>
        <button type="button" onclick="saveForm.save(1,this)"><spring:message code="common_save"/></button>
        <button type="button" onclick="closeWin()"><spring:message code="btn_cancle"/></button>
    </div>
</div>
<form id="inputForm" method="post" >
<input type="hidden" id="id" name="id" value="${handBook.id}"/>
<input type="hidden" id="handbookStatus" name="handbookStatus" value="${handBook.handbookStatus}">
<input type="hidden" id="handbookAuditStatus" name="handbookAuditStatus" value="${handBook.handbookAuditStatus}">

<div class="tabBox">
    <ul class="clearfix">
     	<li class="active" style="width:100px"><spring:message code="handBook_create_tab_export"/></li>
        <li style="width:100px" id="importLi"><spring:message code="handBook_create_tab_import"/></li>
    </ul>
    <div id="handbookExportNumber">
    <p class="tab-a" style="right:470px"><spring:message code="handBook_create_export_num"/><fmt:formatNumber value="${handBook.handbookExportNumber}" pattern="#,##0.#####"/></p>
    <input type="hidden" id="handbookExportNumber" name="handbookExportNumber" value="${handBook.handbookExportNumber}"/>
    </div>
    <div id="handbookExportSum">
    <p class="tab-a" style="right:320px"><spring:message code="handBook_create_export_sum"/><fmt:formatNumber value="${handBook.handbookExportSum}" pattern="#,##0.00###"/></p>
        <input type="hidden" id="handbookExportSum" name="handbookExportSum" value="${handBook.handbookExportSum}"/>
    </div>
    <div id="handbookImportNumber">
    <p class="tab-a" style="right:170px"><spring:message code="handBook_create_import_num"/><fmt:formatNumber value="${handBook.handbookImportNumber}" pattern="#,##0.#####"/></p>
        <input type="hidden" id="handbookImportNumber" name="handbookImportNumber" value="${handBook.handbookImportNumber}"/>
    </div>
    <div id="handbookImportSum">
    <p class="tab-a"><spring:message code="handBook_create_import_sum"/><fmt:formatNumber value="${handBook.handbookImportSum}" pattern="#,##0.00###"/></p>
        <input type="hidden" id="handbookImportSum" name="handbookImportSum" value="${handBook.handbookImportSum}"/>
    </div>
</div>
	<c:set value="<%=ResourcesUtil.getConfig(\"customer_country\")%>" var="customerCountry" />
		<div class="tabBoxSm" id="handbookinfo">
			<input type="hidden" id="indentId" name="indentId" value="${handBook.indentId}"/>
			<input type="hidden" id="trIndex" name="trIndex" value="${handBook.trIndex}"/>
			<input type="hidden" id="commaIndentId" name="commaIndentId" value="${handBook.commaIndentId}"/>
			<input type="hidden" id="commaMaterialReservePurchaseId" name="commaMaterialReservePurchaseId" value="${handBook.commaMaterialReservePurchaseId}"/>
		    <div class="tabSm">
		    	<div class="tableArea">
		        	<div class="tableScroll tableScrollSm" style="width:890px;height:387px;">
		        		<table cellpadding="0" class="tableHead">
		                    <thead>
		                    <tr>
		                    	<th><p class="tab-cz"><spring:message code="handBook_create_head_operate"/></p></th>
		                        <th><p style="width:100px"><spring:message code="handBook_create_head_indent_no"/></p></th>
		                        <th><p style="width:100px"><spring:message code="handBook_create_head_style_no"/></p></th>
		                        <th><p style="width:80px"><spring:message code="handBook_create_head_size"/></p></th>
		                        <th><p style="width:100px"><spring:message code="handBook_create_head_style_name"/></p></th>
		                        <th style="width:70px"><spring:message code="handBook_create_head_num"/></th>
		                        <th><p style="width:40px"><spring:message code="handBook_create_head_unit"/></p></th>
		                        <th><p style="width:40px"><spring:message code="handBook_create_head_currency"/></p></th>
		                        <th><p style="width:70px"><spring:message code="handBook_create_head_price"/></p></th>
		                        <th><p style="width:70px"><spring:message code="handBook_create_head_amount"/></p></th>
		                        <th><p style="width:80px"><spring:message code="handBook_create_head_export"/></p></th>
		                        <th><p style="width:80px"><spring:message code="handBook_create_head_remark"/></p></th>
		                    </tr>
		                    </thead>
		                </table>
		                <!-- 出口成品明细 -->
		                <table cellpadding="0" class="tableBody">
							<c:if test="${not empty handBook.exportDetailsList}">
								<tbody>
									<c:forEach items="${handBook.exportDetailsList}" var="exportDetails" varStatus="exportStatus">
										<tr>
										    <!-- 删除 -->
											<td><p class="tab-cz"><img	src="${ctxStatic}/images/del_icon.png" class="delBtn"	onclick='deleteIndent(${exportStatus.index})'></p></td>
											
											<!-- 合同订单编号 -->
											<td><p style="width:100px" class='text_overflow' data-toggle='tooltip' title='${exportDetails.indentNo}'>${exportDetails.indentNo}</p></td>
											<input type="hidden" class="exportHiddenIndentNo" name="exportDetailsList[${exportStatus.index}].indentNo" value="${exportDetails.indentNo}"/>
											
											<!-- 款式编号 -->
											<td><p style="width: 100px" class='text_overflow' data-toggle='tooltip' title='${exportDetails.styleCustomerNo}'>${exportDetails.styleCustomerNo}</p></td>
											<input type="hidden" class="exportHiddenStyleCustomerNo" name="exportDetailsList[${exportStatus.index}].styleCustomerNo" value="${exportDetails.styleCustomerNo}"/>
											
											<!-- 尺码 -->
											<td><p style="width: 80px" class='text_overflow' data-toggle='tooltip' title='${exportDetails.styleSize}'>${exportDetails.styleSize}</p></td>
											<input type="hidden" class="exportHiddenStyleSize" name="exportDetailsList[${exportStatus.index}].styleSize" value="${exportDetails.styleSize}"/>
											
											<!-- 款式名称 -->
											<td><p style="width: 100px" class='text_overflow' data-toggle='tooltip' title='${exportDetails.styleNameCn}'>${exportDetails.styleNameCn}</p></td>
											<input type="hidden" class="exportHiddenStyleNameCn" name="exportDetailsList[${exportStatus.index}].styleNameCn" value="${exportDetails.styleNameCn}"/>
											
											<!-- 数量 -->
											<td style="width: 70px">
												<input type="tel" name="exportDetailsList[${exportStatus.index}].handbookQuantity" value="<fmt:formatNumber value="${exportDetails.handbookQuantity}" pattern="#,##0.#####"/>" onChange="resetExportTotalValue(${exportStatus.index},this)">
											</td>
											
											<!-- 单位 -->
											<td><p style="width: 40px"><spring:message code="handBook_create_detail_unit"/></p></td>
											
											<!-- 币种 -->
											<td><p style="width: 40px">${exportDetails.handbookCurrency}</p></td>
											<input type="hidden" class="exportHiddenHandbookCurrency" name="exportDetailsList[${exportStatus.index}].handbookCurrency" value="${exportDetails.handbookCurrency}"/>
											<input type="hidden" class="exportHiddenHandbookCurrencyCd" name="exportDetailsList[${exportStatus.index}].handbookCurrencyCd" value="${exportDetails.handbookCurrencyCd}"/>
											<!-- 单价 -->
											<td><p style="width: 70px"><fmt:formatNumber value="${exportDetails.handbookPrice}" pattern="#,##0.00###"/></p></td>
											<input type="hidden" class="exportHiddenHandbookPrice" name="exportDetailsList[${exportStatus.index}].handbookPrice" value="${exportDetails.handbookPrice}"/>
											
											<!-- 总值 -->
											<td><p style="width: 70px"><fmt:formatNumber value="${exportDetails.handbookAmount}" pattern="#,##0.00###"/></p></td>
											<input type="hidden" class="exportHiddenHandbookAmount" name="exportDetailsList[${exportStatus.index}].handbookAmount" value="${exportDetails.handbookAmount}"/>
											
											<!-- 出口国 -->
											<td style="width: 80px">
											<select name="exportDetailsList[${exportStatus.index}].handbookExportsCd" style="width:80px;">
                                               <option value=""><spring:message code="customer_savecountry"/></option>
                                               <c:forEach items="${fns:getDictList(customerCountry)}" var="country">
                                                  <option <c:if test="${fn:split(exportDetails.handbookExportsCd,'-')[1] eq country.itemValue}">selected="selected"</c:if> value="${country.itemCode}-${country.itemValue}">
                                                    ${country.itemName}
                                                  </option>
                                               </c:forEach>                    
                                            </select>
                                            </td>
                                            
											<!-- 合同备注 -->
											<td><p style="width: 80px" class='text_overflow' data-toggle='tooltip' title='${exportDetails.remarks}'>${exportDetails.remarks}</p>
											<input type="hidden" class="exportHiddenRemarks" name="exportDetailsList[${exportStatus.index}].remarks" value="${exportDetails.remarks}"/>
											</td>
											<!-- 合同id -->
											<input type="hidden" class="exportHiddenContractId" name="exportDetailsList[${exportStatus.index}].contractId" value="${exportDetails.contractId}"/>
											<!-- 订单id -->
											<input type="hidden" class="exportHiddenIndentId" name="exportDetailsList[${exportStatus.index}].indentId" value="${exportDetails.indentId}"/>
											<!-- 款式id -->
											<input type="hidden" class="exportHiddenStyleId" name="exportDetailsList[${exportStatus.index}].styleId" value="${exportDetails.styleId}"/>
											<!-- 汇率同合同 -->
											<input type="hidden" class="exportHiddenHandbookExchangeRate" name="exportDetailsList[${exportStatus.index}].handbookExchangeRate" value="${exportDetails.handbookExchangeRate}"/>
										</tr>
									</c:forEach>
								</tbody>
							</c:if>
						</table>
		            </div>
		        </div>
			</div>
		    <div class="tabSm none">
		    	<div class="tableArea">
		        	<div class="tableScroll tableScrollSm" style="width:880px;height:387px;">
		        		<table cellpadding="0" class="tableHead">
		                    <thead>
		                    <tr>
		                        <th><p class="tab-cz"><spring:message code="handBook_create_head_operate"/></p></th>
		                        <th><p style="width:100px"><spring:message code="handBook_create_head_indent_no"/></p></th>
		                        <th><p style="width:100px"><spring:message code="handBook_create_head_style_no"/></p></th>
		                        <th><p style="width:100px"><spring:message code="handBook_create_head_material_name"/></p></th>
		                        <th><p style="width:80px"><spring:message code="handBook_create_head_spec"/></p></th>
		                        <th style="width:70px"><spring:message code="handBook_create_head_num"/></th>
		                        <th><p style="width:40px"><spring:message code="handBook_create_head_unit"/></p></th>
		                        <th><p style="width:40px"><spring:message code="handBook_create_head_currency"/></p></th>
		                        <th><p style="width:70px"><spring:message code="handBook_create_head_price"/></p></th>
		                        <th><p style="width:70px"><spring:message code="handBook_create_head_amount"/></p></th>
		                        <th><p style="width:80px"><spring:message code="handBook_create_head_origin"/></p></th>
		                        <th><p style="width:80px"><spring:message code="handBook_create_head_import"/></p></th>
		                    </tr>
		                    </thead>
		                </table>
		                <!-- 进口料件明细 -->
		                <table cellpadding="0" class="tableBody">
							<c:if test="${not empty handBook.importDetailsList}">
								<tbody>
									<c:forEach items="${handBook.importDetailsList}" var="importDetails" varStatus="importStatus">
										<tr>
										    <!-- 删除 -->
											<td><p class="tab-cz"><img	src="${ctxStatic}/images/del_icon.png" class="delBtn"	onclick='deleteMaterial(${importStatus.index})'></p></td>
											
											<!-- 合同订单编号 -->
											<td><p style="width:100px" class='text_overflow' data-toggle='tooltip' title='${importDetails.indentNo}'>${importDetails.indentNo}</p></td>
											<input type="hidden" class="importHiddenIndentNo" name="importDetailsList[${importStatus.index}].indentNo" value="${importDetails.indentNo}"/>
											
											<!-- 款式编号 -->
											<td><p style="width: 100px" class='text_overflow' data-toggle='tooltip' title='${importDetails.styleCustomerNo}'>${importDetails.styleCustomerNo}</p></td>
											<input type="hidden" class="importHiddenStyleCustomerNo" name="importDetailsList[${importStatus.index}].styleCustomerNo" value="${importDetails.styleCustomerNo}"/>
											
											<!-- 物料名称 -->
											<td><p style="width: 100px" class='text_overflow' data-toggle='tooltip' title='${importDetails.materialNameCn}'>${importDetails.materialNameCn}</p></td>
											<input type="hidden" class="importHiddenMaterialNameCn" name="importDetailsList[${importStatus.index}].materialNameCn" value="${importDetails.materialNameCn}"/>
											
											<!-- 规格型号 -->
											<td><p style="width: 80px">${importDetails.materialSpec}</p></td>
											<input type="hidden" class="importHiddenMaterialSpec" name="importDetailsList[${importStatus.index}].materialSpec" value="${importDetails.materialSpec}"/>
											
											<!-- 数量 -->
											<td style="width: 70px">
												<input type="tel" name="importDetailsList[${importStatus.index}].handbookQuantity" value="<fmt:formatNumber value="${importDetails.handbookQuantity}" pattern="#,##0.#####"/>" onChange="resetImportTotalValue(${importStatus.index},this)">
											</td>
											
											<!-- 单位 -->
											<td><p style="width: 40px">${fns:getDictName(importDetails.unitCd)}</p></td>
											<input type="hidden" class="importHiddenUnitCd" name="importDetailsList[${importStatus.index}].unitCd" value="${importDetails.unitCd}"/>
											
											<!-- 币种 -->
											<td><p style="width: 40px">${importDetails.handbookCurrency}</p></td>
											<input type="hidden" class="importHiddenHandbookCurrency" name="importDetailsList[${importStatus.index}].handbookCurrency" value="${importDetails.handbookCurrency}"/>
											<input type="hidden" class="importHiddenHandbookCurrencyCd" name="importDetailsList[${importStatus.index}].handbookCurrencyCd" value="${importDetails.handbookCurrencyCd}"/>
											
											<!-- 单价 -->
											<td><p style="width: 70px"><fmt:formatNumber value="${importDetails.handbookPrice}" pattern="#,##0.00###"/></p></td>
											<input type="hidden" class="importHiddenHandbookPrice" name="importDetailsList[${importStatus.index}].handbookPrice" value="${importDetails.handbookPrice}"/>
											
											<!-- 总值 -->
											<td><p style="width: 70px"><fmt:formatNumber value="${importDetails.handbookAmount}" pattern="#,##0.00###"/></p></td>
											<input type="hidden" class="importHiddenHandbookAmount" name="importDetailsList[${importStatus.index}].handbookAmount" value="${importDetails.handbookAmount}"/>
											
											<!-- 原产国 -->
											<td style="width: 80px">
											<select name="importDetailsList[${importStatus.index}].handbookImportCd2" style="width:80px;">
                                               <option value=""><spring:message code="customer_savecountry"/></option>
                                               <c:forEach items="${fns:getDictList(customerCountry)}" var="country">
                                                  <option <c:if test="${fn:split(importDetails.handbookImportCd2,'-')[1] eq country.itemValue}">selected="selected"</c:if> value="${country.itemCode}-${country.itemValue}">
                                                    ${country.itemName}
                                                  </option>
                                               </c:forEach>                    
                                            </select>
                                            </td>
                                            
											<!-- 进口国 -->
											<td style="width: 80px">
											<select name="importDetailsList[${importStatus.index}].handbookExportsCd" style="width:80px;">
                                               <option value=""><spring:message code="customer_savecountry"/></option>
                                               <c:forEach items="${fns:getDictList(customerCountry)}" var="country">
                                                  <option <c:if test="${fn:split(importDetails.handbookExportsCd,'-')[1] eq country.itemValue}">selected="selected"</c:if> value="${country.itemCode}-${country.itemValue}">
                                                    ${country.itemName}
                                                  </option>
                                               </c:forEach>                    
                                            </select>
                                            </td>
                                            <!-- 合同id -->
                                            <input type="hidden" class="importHiddenContractId" name="importDetailsList[${importStatus.index}].contractId" value="${importDetails.contractId}"/>
                                            <!-- 订单id -->
                                            <input type="hidden" class="importHiddenIndentId" name="importDetailsList[${importStatus.index}].indentId" value="${importDetails.indentId}"/>
                                            <!-- 款式id -->
                                            <input type="hidden" class="importHiddenStyleId" name="importDetailsList[${importStatus.index}].styleId" value="${importDetails.styleId}"/>
                                            <!-- 物料id -->
                                            <input type="hidden" class="importHiddenMaterialId" name="importDetailsList[${importStatus.index}].materialId" value="${importDetails.materialId}"/>
                                            <!-- 汇率 -->
                                            <input type="hidden" class="importHiddenHandbookExchangeRate" name="importDetailsList[${importStatus.index}].handbookExchangeRate" value="${importDetails.handbookExchangeRate}"/>
										</tr>
									</c:forEach>
								</tbody>
							</c:if>
		                </table>
		            </div>
		        </div>
		    </div>
		</div>
	</form>
</body>
</html>